package day1114_3;

public class W5 {
    public static void main(String[] args) {
        double rs=0;
        for(double i=1; i<=20; i++){
            rs=1/(i*(i+1)) +rs;//System.out.println(1+"/("+  i    +"*"+ (i+1) +")");
        }   //1/(1*2)     1/(2*3)   1/(3*4)    1/(4*5)...1/(20*21)
        System.out.println(rs);
    }
}
//47页的案例